package com.demo.miaosha.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.util.Date;

/**
 * https://mp.baomidou.com/guide/annotation.html#tablelogic
 *
 * @blame 吴经纶
 */
@Data
@Builder
@TableName(value = "t_user")
public class User {
    /**
     * 分配ID(主键类型为Number(Long和Integer)或String)(since 3.3.0),
     * 使用接口IdentifierGenerator的方法nextId
     * (默认实现类为DefaultIdentifierGenerator雪花算法)
     * */
    @TableId(value = "uuid",type = IdType.ASSIGN_ID)
    private String uuid;
    @TableField(value = "name")
    private String name;
    @TableField(value = "password")
    private String password;
    @TableField(value = "salt")
    private String salt;
    @TableField(value = "head")
    private String head;
    @TableField(value = "register_date")
    private Date registerDate;
    @TableField(value = "last_login_date")
    private Date lastLoginDate;
    @TableField(value = "login_count")
    private Integer loginCount;


}
